#ifndef DOCUMENT_H
#define DOCUMENT_H
#include <QTextEdit>
#include <QString>

class document:public QTextEdit
{
    Q_OBJECT
    Q_PROPERTY(QString text MEMBER _text NOTIFY textChanged FINAL)

public:
    explicit document(QWidget *parent = nullptr) : QTextEdit(parent) {}
    void setText(const QString& text);
signals:
    void textChanged(const QString &text);
private:
    QString _text;
};

#endif // DOCUMENT_H
